package com.itheima.dao.impl;

import com.itheima.dao.DeptDao;
import org.apache.commons.io.IOUtils;

import java.io.InputStream;
import java.util.List;

public class DeptDaoimpl implements DeptDao {
    @Override
    public List<String> list() {
        InputStream in = this.getClass().getClassLoader().getResourceAsStream("dept.txt");
        List<String> lines = IOUtils.readLines(in, "UTF-8");
        return lines;
    }
}
